package com.cskaoyan.controller;

import com.cskaoyan.service.AddressService;
import com.cskaoyan.vo.AddressVo;
import com.cskaoyan.vo.BaseRespVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AddressController {

    @Autowired
    AddressService addressService;

    @RequestMapping("admin/address/list")
    public BaseRespVo list(Integer page,Integer limit,String sort,String order,Integer userId,String name){
        AddressVo addressVo = addressService.query(page,limit,sort,order,userId,name);
        return BaseRespVo.ok(addressVo);
    }

}
